import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: ()=>import('../views/login')
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },{
	path:'/main',
	name:'Main',
	component: () => import('@/views/Home'),
	children:[{
		path:'/course/manage',
		name:'courseManage',
		component:()=> import('../views/course')
	},{
		path:'/banji',
		name:'banji',
		component:()=>import('../views/banji')
	},{
		path:'/student',
		name:'student',
		component:()=>import('../views/student')
	},{
		path:'/grade/classGradeManage',
		name:'classGradeManage',
		component:()=>import('../views/classGrade')
	},{
		path:'/grade/peasonGradeManage',
		name:'peasonGradeManage',
		component:()=>import('../views/peasonGrade.vue')
	},{
		path:'/grade/classGradeList',
		name:'classGradeList',
		component:()=>import('@/views/classGradeList')
	}]
  },
  {
	path:'/stuMain',
	name:'stuMain',
	component:()=>import('@/views/stuMain'),
	children:[{
		path:'/myGrade',
		name:'myGrade',
		component:()=>import('@/views/myGrade')
	},{
		path:'/myClassGrade',
		name:'myClassGrade',
		component:()=>import('@/views/myClassGrade')
	}]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
